package com.zx.auth.block.repository.custom;

import com.zx.auth.block.modle.OAuth2RegisteredClient;
import com.zx.auth.block.param.OAuth2ClientParam;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;

import java.util.List;

/**
 * <p>
 * description: OAuth2注册客户端自定义仓库接口 <br>
 * create: 2025-11-13 10:00
 * </p>
 *
 * @author
 */
public interface OAuth2RegisteredClientCustomRepository {
    /**
     * 根据条件分页查询客户端
     *
     * @param clientParam 查询条件
     * @param pageable    分页对象
     * @param tenantId    租户ID
     * @return 客户端分页结果
     */
    Page<OAuth2RegisteredClient> findClientsByPage(OAuth2ClientParam clientParam, Pageable pageable, String tenantId);

    /**
     * 根据客户端ID和租户ID查找客户端
     *
     * @param clientId 客户端ID
     * @param tenantId 租户ID
     * @return 客户端列表
     */
    List<OAuth2RegisteredClient> findByClientIdAndTenantId(String clientId, String tenantId);
}